<?php
	$field=$_GET['field'];
	$table=$_GET['table'];
	$value=$_GET['value'];
	if($table=='khachhang')
	{
		$m="danhsach".'nguoidung'; 
		$object='';
		$t=$knoi->queryCsdl("select tendn from taikhoan where ".$field."='$value'");
		if(mysql_num_rows($t)==1)
			$object="nguoidung";
	}
	else
		$m="danhsach".$table;
	if(!$knoi->queryCsdl("delete from ".$table." where ".$field."='$value'"))
	{
	?>
		<script language="javascript">alert("Có lỗi xãy ra. Xin vui lòng kiểm tra lại!");</script>
	<?php
	}
	if(isset($_GET['value_radio']))
	{
		$radio=$_GET['value_radio'];
	?>
		<meta http-equiv="refresh" content="0;url=home_admin.php?module=<?php echo $m; ?>&loai=<?php echo $radio; ?>" />
	<?php
	}
	else if($table=="khachhang" && $object=="nguoidung")
	{
	?>
		<meta http-equiv="refresh" content="0;url=home_admin.php?module=<?php echo $m; ?>&object=<?php echo $object; ?>" />
	<?php	
	}
	else
?>
	<meta http-equiv="refresh" content="0;url=home_admin.php?module=<?php echo $m; ?>" />